package com.mall.b2c.template.directive;

import java.io.IOException;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.mall.b2c.bean.IntergralShopClassBean;
import com.mall.b2c.hessian.IntergralHessian;

import freemarker.core.Environment;
import freemarker.template.TemplateDirectiveBody;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;
@Repository
public class IntergralClassListDirective extends BaseDirective{
	@Resource private IntergralHessian intergralHessian;
	@Override
	public void execute(Environment env, Map params, TemplateModel[] loopVars,
			TemplateDirectiveBody body)
			throws TemplateException, IOException {

		renderParamToBody("shopclassList", jsonToList(intergralHessian.getShopClassList(),IntergralShopClassBean.class), env, body);
	}

}
